3.1078 \(\int (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^3 \, dx\)

Optimal. Leaf size=141 \[ -\frac{a^2 (c+d \tan (e+f x))^4}{4 d f}+\frac{2 i a^2 (c+d \tan (e+f x))^3}{3 f}+\frac{a^2 (d+i c) (c+d \tan (e+f x))^2}{f}+\frac{2 i a^2 d (c-i d)^2 \tan (e+f x)}{f}+\frac{2 a^2 (d+i c)^3 \log (\cos (e+f x))}{f}+2 a^2 x (c-i d)^3 \]

[Out]

2*a^2*(c - I*d)^3*x + (2*a^2*(I*c + d)^3*Log[Cos[e + f*x]])/f + ((2*I)*a^2*(c - I*d)^2*d*Tan[e + f*x])/f + (a^
2*(I*c + d)*(c + d*Tan[e + f*x])^2)/f + (((2*I)/3)*a^2*(c + d*Tan[e + f*x])^3)/f - (a^2*(c + d*Tan[e + f*x])^4
)/(4*d*f)

________________________________________________________________________________________

Rubi [A]  time = 0.199663, antiderivative size = 141, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.143, Rules used = {3543, 3528, 3525, 3475} \[ -\frac{a^2 (c+d \tan (e+f x))^4}{4 d f}+\frac{2 i a^2 (c+d \tan (e+f x))^3}{3 f}+\frac{a^2 (d+i c) (c+d \tan (e+f x))^2}{f}+\frac{2 i a^2 d (c-i d)^2 \tan (e+f x)}{f}+\frac{2 a^2 (d+i c)^3 \log (\cos (e+f x))}{f}+2 a^2 x (c-i d)^3 \]

Antiderivative was successfully verified.

[In]

Int[(a + I*a*Tan[e + f*x])^2*(c + d*Tan[e + f*x])^3,x]

[Out]

2*a^2*(c - I*d)^3*x + (2*a^2*(I*c + d)^3*Log[Cos[e + f*x]])/f + ((2*I)*a^2*(c - I*d)^2*d*Tan[e + f*x])/f + (a^
2*(I*c + d)*(c + d*Tan[e + f*x])^2)/f + (((2*I)/3)*a^2*(c + d*Tan[e + f*x])^3)/f - (a^2*(c + d*Tan[e + f*x])^4
)/(4*d*f)

Rule 3543

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^2, x_Symbol] :> Simp[
(d^2*(a + b*Tan[e + f*x])^(m + 1))/(b*f*(m + 1)), x] + Int[(a + b*Tan[e + f*x])^m*Simp[c^2 - d^2 + 2*c*d*Tan[e
 + f*x], x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b*c - a*d, 0] &&  !LeQ[m, -1] &&  !(EqQ[m, 2] && EqQ
[a, 0])

Rule 3528

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(d
*(a + b*Tan[e + f*x])^m)/(f*m), x] + Int[(a + b*Tan[e + f*x])^(m - 1)*Simp[a*c - b*d + (b*c + a*d)*Tan[e + f*x
], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && GtQ[m, 0]

Rule 3525

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(a*c - b
*d)*x, x] + (Dist[b*c + a*d, Int[Tan[e + f*x], x], x] + Simp[(b*d*Tan[e + f*x])/f, x]) /; FreeQ[{a, b, c, d, e
, f}, x] && NeQ[b*c - a*d, 0] && NeQ[b*c + a*d, 0]

Rule 3475

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^3 \, dx &=-\frac{a^2 (c+d \tan (e+f x))^4}{4 d f}+\int \left (2 a^2+2 i a^2 \tan (e+f x)\right ) (c+d \tan (e+f x))^3 \, dx\\ &=\frac{2 i a^2 (c+d \tan (e+f x))^3}{3 f}-\frac{a^2 (c+d \tan (e+f x))^4}{4 d f}+\int (c+d \tan (e+f x))^2 \left (2 a^2 (c-i d)+2 a^2 (i c+d) \tan (e+f x)\right ) \, dx\\ &=\frac{a^2 (i c+d) (c+d \tan (e+f x))^2}{f}+\frac{2 i a^2 (c+d \tan (e+f x))^3}{3 f}-\frac{a^2 (c+d \tan (e+f x))^4}{4 d f}+\int \left (2 a^2 (c-i d)^2+2 i a^2 (c-i d)^2 \tan (e+f x)\right ) (c+d \tan (e+f x)) \, dx\\ &=2 a^2 (c-i d)^3 x+\frac{2 i a^2 (c-i d)^2 d \tan (e+f x)}{f}+\frac{a^2 (i c+d) (c+d \tan (e+f x))^2}{f}+\frac{2 i a^2 (c+d \tan (e+f x))^3}{3 f}-\frac{a^2 (c+d \tan (e+f x))^4}{4 d f}-\left (2 a^2 (i c+d)^3\right ) \int \tan (e+f x) \, dx\\ &=2 a^2 (c-i d)^3 x+\frac{2 a^2 (i c+d)^3 \log (\cos (e+f x))}{f}+\frac{2 i a^2 (c-i d)^2 d \tan (e+f x)}{f}+\frac{a^2 (i c+d) (c+d \tan (e+f x))^2}{f}+\frac{2 i a^2 (c+d \tan (e+f x))^3}{3 f}-\frac{a^2 (c+d \tan (e+f x))^4}{4 d f}\\ \end{align*}

Mathematica [B]  time = 7.85022, size = 733, normalized size = 5.2 \[ \frac{\sec ^2(e+f x) (a+i a \tan (e+f x))^2 \left (\frac{1}{24} \sec (e) (\cos (2 e)-i \sin (2 e)) \left (6 \cos (e) \left (c^2 d (-3-9 i f x)+3 c^3 f x+3 c d^2 (-3 f x+2 i)+d^3 (2+3 i f x)\right )+54 i c^2 d \sin (e+2 f x)-18 i c^2 d \sin (3 e+2 f x)+18 i c^2 d \sin (3 e+4 f x)-9 c^2 d \cos (3 e+2 f x)-36 i c^2 d f x \cos (3 e+2 f x)-9 i c^2 d f x \cos (3 e+4 f x)-9 i c^2 d f x \cos (5 e+4 f x)-54 i c^2 d \sin (e)-9 c^3 \sin (e+2 f x)+3 c^3 \sin (3 e+2 f x)-3 c^3 \sin (3 e+4 f x)+12 c^3 f x \cos (3 e+2 f x)+3 c^3 f x \cos (3 e+4 f x)+3 c^3 f x \cos (5 e+4 f x)+9 c^3 \sin (e)+57 c d^2 \sin (e+2 f x)-27 c d^2 \sin (3 e+2 f x)+21 c d^2 \sin (3 e+4 f x)+18 i c d^2 \cos (3 e+2 f x)-36 c d^2 f x \cos (3 e+2 f x)-9 c d^2 f x \cos (3 e+4 f x)-9 c d^2 f x \cos (5 e+4 f x)-63 c d^2 \sin (e)+3 (c-i d)^2 (4 c f x-4 i d f x-3 d) \cos (e+2 f x)-20 i d^3 \sin (e+2 f x)+12 i d^3 \sin (3 e+2 f x)-8 i d^3 \sin (3 e+4 f x)+9 d^3 \cos (3 e+2 f x)+12 i d^3 f x \cos (3 e+2 f x)+3 i d^3 f x \cos (3 e+4 f x)+3 i d^3 f x \cos (5 e+4 f x)+24 i d^3 \sin (e)\right )+2 f x (c-i d)^3 (\cos (2 e)-i \sin (2 e)) \cos ^4(e+f x)+(c-i d)^3 (-\sin (2 e)-i \cos (2 e)) \cos ^4(e+f x) \log \left (\cos ^2(e+f x)\right )-2 (c-i d)^3 (\cos (2 e)-i \sin (2 e)) \cos ^4(e+f x) \tan ^{-1}(\tan (3 e+f x))\right )}{f (\cos (f x)+i \sin (f x))^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + I*a*Tan[e + f*x])^2*(c + d*Tan[e + f*x])^3,x]

[Out]

(Sec[e + f*x]^2*((c - I*d)^3*Cos[e + f*x]^4*Log[Cos[e + f*x]^2]*((-I)*Cos[2*e] - Sin[2*e]) + 2*(c - I*d)^3*f*x
*Cos[e + f*x]^4*(Cos[2*e] - I*Sin[2*e]) - 2*(c - I*d)^3*ArcTan[Tan[3*e + f*x]]*Cos[e + f*x]^4*(Cos[2*e] - I*Si
n[2*e]) + (Sec[e]*(Cos[2*e] - I*Sin[2*e])*(6*(3*c^3*f*x + 3*c*d^2*(2*I - 3*f*x) + d^3*(2 + (3*I)*f*x) + c^2*d*
(-3 - (9*I)*f*x))*Cos[e] + 3*(c - I*d)^2*(-3*d + 4*c*f*x - (4*I)*d*f*x)*Cos[e + 2*f*x] - 9*c^2*d*Cos[3*e + 2*f
*x] + (18*I)*c*d^2*Cos[3*e + 2*f*x] + 9*d^3*Cos[3*e + 2*f*x] + 12*c^3*f*x*Cos[3*e + 2*f*x] - (36*I)*c^2*d*f*x*
Cos[3*e + 2*f*x] - 36*c*d^2*f*x*Cos[3*e + 2*f*x] + (12*I)*d^3*f*x*Cos[3*e + 2*f*x] + 3*c^3*f*x*Cos[3*e + 4*f*x
] - (9*I)*c^2*d*f*x*Cos[3*e + 4*f*x] - 9*c*d^2*f*x*Cos[3*e + 4*f*x] + (3*I)*d^3*f*x*Cos[3*e + 4*f*x] + 3*c^3*f
*x*Cos[5*e + 4*f*x] - (9*I)*c^2*d*f*x*Cos[5*e + 4*f*x] - 9*c*d^2*f*x*Cos[5*e + 4*f*x] + (3*I)*d^3*f*x*Cos[5*e
+ 4*f*x] + 9*c^3*Sin[e] - (54*I)*c^2*d*Sin[e] - 63*c*d^2*Sin[e] + (24*I)*d^3*Sin[e] - 9*c^3*Sin[e + 2*f*x] + (
54*I)*c^2*d*Sin[e + 2*f*x] + 57*c*d^2*Sin[e + 2*f*x] - (20*I)*d^3*Sin[e + 2*f*x] + 3*c^3*Sin[3*e + 2*f*x] - (1
8*I)*c^2*d*Sin[3*e + 2*f*x] - 27*c*d^2*Sin[3*e + 2*f*x] + (12*I)*d^3*Sin[3*e + 2*f*x] - 3*c^3*Sin[3*e + 4*f*x]
 + (18*I)*c^2*d*Sin[3*e + 4*f*x] + 21*c*d^2*Sin[3*e + 4*f*x] - (8*I)*d^3*Sin[3*e + 4*f*x]))/24)*(a + I*a*Tan[e
 + f*x])^2)/(f*(Cos[f*x] + I*Sin[f*x])^2)

________________________________________________________________________________________

Maple [B]  time = 0.006, size = 360, normalized size = 2.6 \begin{align*}{\frac{2\,i{a}^{2}\arctan \left ( \tan \left ( fx+e \right ) \right ){d}^{3}}{f}}-{\frac{{a}^{2}{d}^{3} \left ( \tan \left ( fx+e \right ) \right ) ^{4}}{4\,f}}+{\frac{6\,i{a}^{2}{c}^{2}d\tan \left ( fx+e \right ) }{f}}-{\frac{{a}^{2} \left ( \tan \left ( fx+e \right ) \right ) ^{3}c{d}^{2}}{f}}+{\frac{{\frac{2\,i}{3}}{a}^{2} \left ( \tan \left ( fx+e \right ) \right ) ^{3}{d}^{3}}{f}}+{\frac{i{a}^{2}\ln \left ( 1+ \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ){c}^{3}}{f}}-{\frac{3\,{a}^{2} \left ( \tan \left ( fx+e \right ) \right ) ^{2}{c}^{2}d}{2\,f}}+{\frac{{a}^{2} \left ( \tan \left ( fx+e \right ) \right ) ^{2}{d}^{3}}{f}}-{\frac{{a}^{2}{c}^{3}\tan \left ( fx+e \right ) }{f}}+6\,{\frac{{a}^{2}\tan \left ( fx+e \right ) c{d}^{2}}{f}}-{\frac{6\,i{a}^{2}\arctan \left ( \tan \left ( fx+e \right ) \right ){c}^{2}d}{f}}-{\frac{3\,i{a}^{2}\ln \left ( 1+ \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) c{d}^{2}}{f}}+3\,{\frac{{a}^{2}\ln \left ( 1+ \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ){c}^{2}d}{f}}-{\frac{{a}^{2}\ln \left ( 1+ \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ){d}^{3}}{f}}+{\frac{3\,i{a}^{2} \left ( \tan \left ( fx+e \right ) \right ) ^{2}c{d}^{2}}{f}}-{\frac{2\,i{a}^{2}{d}^{3}\tan \left ( fx+e \right ) }{f}}+2\,{\frac{{a}^{2}\arctan \left ( \tan \left ( fx+e \right ) \right ){c}^{3}}{f}}-6\,{\frac{{a}^{2}\arctan \left ( \tan \left ( fx+e \right ) \right ) c{d}^{2}}{f}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+I*a*tan(f*x+e))^2*(c+d*tan(f*x+e))^3,x)

[Out]

2*I/f*a^2*arctan(tan(f*x+e))*d^3-1/4/f*a^2*d^3*tan(f*x+e)^4+6*I/f*a^2*c^2*d*tan(f*x+e)-1/f*a^2*tan(f*x+e)^3*c*
d^2+2/3*I/f*a^2*tan(f*x+e)^3*d^3+I/f*a^2*ln(1+tan(f*x+e)^2)*c^3-3/2/f*a^2*tan(f*x+e)^2*c^2*d+1/f*a^2*tan(f*x+e
)^2*d^3-a^2*c^3*tan(f*x+e)/f+6/f*a^2*tan(f*x+e)*c*d^2-6*I/f*a^2*arctan(tan(f*x+e))*c^2*d-3*I/f*a^2*ln(1+tan(f*
x+e)^2)*c*d^2+3/f*a^2*ln(1+tan(f*x+e)^2)*c^2*d-1/f*a^2*ln(1+tan(f*x+e)^2)*d^3+3*I/f*a^2*tan(f*x+e)^2*c*d^2-2*I
/f*a^2*d^3*tan(f*x+e)+2/f*a^2*arctan(tan(f*x+e))*c^3-6/f*a^2*arctan(tan(f*x+e))*c*d^2

________________________________________________________________________________________

Maxima [A]  time = 1.51292, size = 294, normalized size = 2.09 \begin{align*} -\frac{3 \, a^{2} d^{3} \tan \left (f x + e\right )^{4} +{\left (12 \, a^{2} c d^{2} - 8 i \, a^{2} d^{3}\right )} \tan \left (f x + e\right )^{3} + 6 \,{\left (3 \, a^{2} c^{2} d - 6 i \, a^{2} c d^{2} - 2 \, a^{2} d^{3}\right )} \tan \left (f x + e\right )^{2} - 12 \,{\left (2 \, a^{2} c^{3} - 6 i \, a^{2} c^{2} d - 6 \, a^{2} c d^{2} + 2 i \, a^{2} d^{3}\right )}{\left (f x + e\right )} - 12 \,{\left (i \, a^{2} c^{3} + 3 \, a^{2} c^{2} d - 3 i \, a^{2} c d^{2} - a^{2} d^{3}\right )} \log \left (\tan \left (f x + e\right )^{2} + 1\right ) +{\left (12 \, a^{2} c^{3} - 72 i \, a^{2} c^{2} d - 72 \, a^{2} c d^{2} + 24 i \, a^{2} d^{3}\right )} \tan \left (f x + e\right )}{12 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))^2*(c+d*tan(f*x+e))^3,x, algorithm="maxima")

[Out]

-1/12*(3*a^2*d^3*tan(f*x + e)^4 + (12*a^2*c*d^2 - 8*I*a^2*d^3)*tan(f*x + e)^3 + 6*(3*a^2*c^2*d - 6*I*a^2*c*d^2
 - 2*a^2*d^3)*tan(f*x + e)^2 - 12*(2*a^2*c^3 - 6*I*a^2*c^2*d - 6*a^2*c*d^2 + 2*I*a^2*d^3)*(f*x + e) - 12*(I*a^
2*c^3 + 3*a^2*c^2*d - 3*I*a^2*c*d^2 - a^2*d^3)*log(tan(f*x + e)^2 + 1) + (12*a^2*c^3 - 72*I*a^2*c^2*d - 72*a^2
*c*d^2 + 24*I*a^2*d^3)*tan(f*x + e))/f

________________________________________________________________________________________

Fricas [B]  time = 1.63543, size = 1141, normalized size = 8.09 \begin{align*} \frac{-6 i \, a^{2} c^{3} - 36 \, a^{2} c^{2} d + 42 i \, a^{2} c d^{2} + 16 \, a^{2} d^{3} +{\left (-6 i \, a^{2} c^{3} - 54 \, a^{2} c^{2} d + 90 i \, a^{2} c d^{2} + 42 \, a^{2} d^{3}\right )} e^{\left (6 i \, f x + 6 i \, e\right )} +{\left (-18 i \, a^{2} c^{3} - 144 \, a^{2} c^{2} d + 198 i \, a^{2} c d^{2} + 72 \, a^{2} d^{3}\right )} e^{\left (4 i \, f x + 4 i \, e\right )} +{\left (-18 i \, a^{2} c^{3} - 126 \, a^{2} c^{2} d + 150 i \, a^{2} c d^{2} + 58 \, a^{2} d^{3}\right )} e^{\left (2 i \, f x + 2 i \, e\right )} +{\left (-6 i \, a^{2} c^{3} - 18 \, a^{2} c^{2} d + 18 i \, a^{2} c d^{2} + 6 \, a^{2} d^{3} +{\left (-6 i \, a^{2} c^{3} - 18 \, a^{2} c^{2} d + 18 i \, a^{2} c d^{2} + 6 \, a^{2} d^{3}\right )} e^{\left (8 i \, f x + 8 i \, e\right )} +{\left (-24 i \, a^{2} c^{3} - 72 \, a^{2} c^{2} d + 72 i \, a^{2} c d^{2} + 24 \, a^{2} d^{3}\right )} e^{\left (6 i \, f x + 6 i \, e\right )} +{\left (-36 i \, a^{2} c^{3} - 108 \, a^{2} c^{2} d + 108 i \, a^{2} c d^{2} + 36 \, a^{2} d^{3}\right )} e^{\left (4 i \, f x + 4 i \, e\right )} +{\left (-24 i \, a^{2} c^{3} - 72 \, a^{2} c^{2} d + 72 i \, a^{2} c d^{2} + 24 \, a^{2} d^{3}\right )} e^{\left (2 i \, f x + 2 i \, e\right )}\right )} \log \left (e^{\left (2 i \, f x + 2 i \, e\right )} + 1\right )}{3 \,{\left (f e^{\left (8 i \, f x + 8 i \, e\right )} + 4 \, f e^{\left (6 i \, f x + 6 i \, e\right )} + 6 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 4 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))^2*(c+d*tan(f*x+e))^3,x, algorithm="fricas")

[Out]

1/3*(-6*I*a^2*c^3 - 36*a^2*c^2*d + 42*I*a^2*c*d^2 + 16*a^2*d^3 + (-6*I*a^2*c^3 - 54*a^2*c^2*d + 90*I*a^2*c*d^2
 + 42*a^2*d^3)*e^(6*I*f*x + 6*I*e) + (-18*I*a^2*c^3 - 144*a^2*c^2*d + 198*I*a^2*c*d^2 + 72*a^2*d^3)*e^(4*I*f*x
 + 4*I*e) + (-18*I*a^2*c^3 - 126*a^2*c^2*d + 150*I*a^2*c*d^2 + 58*a^2*d^3)*e^(2*I*f*x + 2*I*e) + (-6*I*a^2*c^3
 - 18*a^2*c^2*d + 18*I*a^2*c*d^2 + 6*a^2*d^3 + (-6*I*a^2*c^3 - 18*a^2*c^2*d + 18*I*a^2*c*d^2 + 6*a^2*d^3)*e^(8
*I*f*x + 8*I*e) + (-24*I*a^2*c^3 - 72*a^2*c^2*d + 72*I*a^2*c*d^2 + 24*a^2*d^3)*e^(6*I*f*x + 6*I*e) + (-36*I*a^
2*c^3 - 108*a^2*c^2*d + 108*I*a^2*c*d^2 + 36*a^2*d^3)*e^(4*I*f*x + 4*I*e) + (-24*I*a^2*c^3 - 72*a^2*c^2*d + 72
*I*a^2*c*d^2 + 24*a^2*d^3)*e^(2*I*f*x + 2*I*e))*log(e^(2*I*f*x + 2*I*e) + 1))/(f*e^(8*I*f*x + 8*I*e) + 4*f*e^(
6*I*f*x + 6*I*e) + 6*f*e^(4*I*f*x + 4*I*e) + 4*f*e^(2*I*f*x + 2*I*e) + f)

________________________________________________________________________________________

Sympy [B]  time = 89.5474, size = 343, normalized size = 2.43 \begin{align*} \frac{2 a^{2} \left (- i c^{3} - 3 c^{2} d + 3 i c d^{2} + d^{3}\right ) \log{\left (e^{2 i f x} + e^{- 2 i e} \right )}}{f} + \frac{- \frac{\left (2 i a^{2} c^{3} + 18 a^{2} c^{2} d - 30 i a^{2} c d^{2} - 14 a^{2} d^{3}\right ) e^{- 2 i e} e^{6 i f x}}{f} - \frac{\left (6 i a^{2} c^{3} + 36 a^{2} c^{2} d - 42 i a^{2} c d^{2} - 16 a^{2} d^{3}\right ) e^{- 8 i e}}{3 f} - \frac{\left (6 i a^{2} c^{3} + 48 a^{2} c^{2} d - 66 i a^{2} c d^{2} - 24 a^{2} d^{3}\right ) e^{- 4 i e} e^{4 i f x}}{f} - \frac{\left (18 i a^{2} c^{3} + 126 a^{2} c^{2} d - 150 i a^{2} c d^{2} - 58 a^{2} d^{3}\right ) e^{- 6 i e} e^{2 i f x}}{3 f}}{e^{8 i f x} + 4 e^{- 2 i e} e^{6 i f x} + 6 e^{- 4 i e} e^{4 i f x} + 4 e^{- 6 i e} e^{2 i f x} + e^{- 8 i e}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))**2*(c+d*tan(f*x+e))**3,x)

[Out]

2*a**2*(-I*c**3 - 3*c**2*d + 3*I*c*d**2 + d**3)*log(exp(2*I*f*x) + exp(-2*I*e))/f + (-(2*I*a**2*c**3 + 18*a**2
*c**2*d - 30*I*a**2*c*d**2 - 14*a**2*d**3)*exp(-2*I*e)*exp(6*I*f*x)/f - (6*I*a**2*c**3 + 36*a**2*c**2*d - 42*I
*a**2*c*d**2 - 16*a**2*d**3)*exp(-8*I*e)/(3*f) - (6*I*a**2*c**3 + 48*a**2*c**2*d - 66*I*a**2*c*d**2 - 24*a**2*
d**3)*exp(-4*I*e)*exp(4*I*f*x)/f - (18*I*a**2*c**3 + 126*a**2*c**2*d - 150*I*a**2*c*d**2 - 58*a**2*d**3)*exp(-
6*I*e)*exp(2*I*f*x)/(3*f))/(exp(8*I*f*x) + 4*exp(-2*I*e)*exp(6*I*f*x) + 6*exp(-4*I*e)*exp(4*I*f*x) + 4*exp(-6*
I*e)*exp(2*I*f*x) + exp(-8*I*e))

________________________________________________________________________________________

Giac [B]  time = 2.14647, size = 1220, normalized size = 8.65 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))^2*(c+d*tan(f*x+e))^3,x, algorithm="giac")

[Out]

1/3*(-6*I*a^2*c^3*e^(8*I*f*x + 8*I*e)*log(e^(2*I*f*x + 2*I*e) + 1) - 18*a^2*c^2*d*e^(8*I*f*x + 8*I*e)*log(e^(2
*I*f*x + 2*I*e) + 1) + 18*I*a^2*c*d^2*e^(8*I*f*x + 8*I*e)*log(e^(2*I*f*x + 2*I*e) + 1) + 6*a^2*d^3*e^(8*I*f*x
+ 8*I*e)*log(e^(2*I*f*x + 2*I*e) + 1) - 24*I*a^2*c^3*e^(6*I*f*x + 6*I*e)*log(e^(2*I*f*x + 2*I*e) + 1) - 72*a^2
*c^2*d*e^(6*I*f*x + 6*I*e)*log(e^(2*I*f*x + 2*I*e) + 1) + 72*I*a^2*c*d^2*e^(6*I*f*x + 6*I*e)*log(e^(2*I*f*x +
2*I*e) + 1) + 24*a^2*d^3*e^(6*I*f*x + 6*I*e)*log(e^(2*I*f*x + 2*I*e) + 1) - 36*I*a^2*c^3*e^(4*I*f*x + 4*I*e)*l
og(e^(2*I*f*x + 2*I*e) + 1) - 108*a^2*c^2*d*e^(4*I*f*x + 4*I*e)*log(e^(2*I*f*x + 2*I*e) + 1) + 108*I*a^2*c*d^2
*e^(4*I*f*x + 4*I*e)*log(e^(2*I*f*x + 2*I*e) + 1) + 36*a^2*d^3*e^(4*I*f*x + 4*I*e)*log(e^(2*I*f*x + 2*I*e) + 1
) - 24*I*a^2*c^3*e^(2*I*f*x + 2*I*e)*log(e^(2*I*f*x + 2*I*e) + 1) - 72*a^2*c^2*d*e^(2*I*f*x + 2*I*e)*log(e^(2*
I*f*x + 2*I*e) + 1) + 72*I*a^2*c*d^2*e^(2*I*f*x + 2*I*e)*log(e^(2*I*f*x + 2*I*e) + 1) + 24*a^2*d^3*e^(2*I*f*x
+ 2*I*e)*log(e^(2*I*f*x + 2*I*e) + 1) - 6*I*a^2*c^3*e^(6*I*f*x + 6*I*e) - 54*a^2*c^2*d*e^(6*I*f*x + 6*I*e) + 9
0*I*a^2*c*d^2*e^(6*I*f*x + 6*I*e) + 42*a^2*d^3*e^(6*I*f*x + 6*I*e) - 18*I*a^2*c^3*e^(4*I*f*x + 4*I*e) - 144*a^
2*c^2*d*e^(4*I*f*x + 4*I*e) + 198*I*a^2*c*d^2*e^(4*I*f*x + 4*I*e) + 72*a^2*d^3*e^(4*I*f*x + 4*I*e) - 18*I*a^2*
c^3*e^(2*I*f*x + 2*I*e) - 126*a^2*c^2*d*e^(2*I*f*x + 2*I*e) + 150*I*a^2*c*d^2*e^(2*I*f*x + 2*I*e) + 58*a^2*d^3
*e^(2*I*f*x + 2*I*e) - 6*I*a^2*c^3*log(e^(2*I*f*x + 2*I*e) + 1) - 18*a^2*c^2*d*log(e^(2*I*f*x + 2*I*e) + 1) +
18*I*a^2*c*d^2*log(e^(2*I*f*x + 2*I*e) + 1) + 6*a^2*d^3*log(e^(2*I*f*x + 2*I*e) + 1) - 6*I*a^2*c^3 - 36*a^2*c^
2*d + 42*I*a^2*c*d^2 + 16*a^2*d^3)/(f*e^(8*I*f*x + 8*I*e) + 4*f*e^(6*I*f*x + 6*I*e) + 6*f*e^(4*I*f*x + 4*I*e)
+ 4*f*e^(2*I*f*x + 2*I*e) + f)